<?php

require_once 'Zend/View/Helper/Abstract.php';

class Core_View_Helper_Form_LinkList extends Zend_View_Helper_Abstract
{
    /**
     * comments
     */
    public function linkList($rowset, $linkTemplate, $replacements = array())
    {
        if (count($rowset) > 0) {
            foreach ($rowset as $row) {
                $link = $linkTemplate;
                foreach ($replacements as $tag) {
                    $link = str_replace('{' . $tag . '}', $row->$tag, $link);
                }
                $links[] = $link;
            }
            if (is_array($links)) {
                return $this->view->htmlList($links, null, null, false);
            }
        } else {
            return false;
        }
    }
}